import { default as request, cloud } from '@/framework/utils/request'
const ZB = '/group', FILE = '/file', Key = '/focusIndustry'
export default ({
  // 专班
  getZBList(data) {
    return request({
      url: `${cloud.investment}${ZB}/list`,
      method: 'post',
      data
    })
  },
  addZBItem(data) {
    return request({
      url: `${cloud.investment}${ZB}/add`,
      method: 'post',
      data
    })
  },
  updateZBItem(data) {
    return request({
      url: `${cloud.investment}${ZB}/edit`,
      method: 'post',
      data
    })
  },
  delZBItem(data) {
    return request({
      url: `${cloud.investment}${ZB}/delete`,
      method: 'get',
      params: data
    })
  },
  detailZBItem(data) {
    return request({
      url: `${cloud.investment}${ZB}/detail`,
      method: 'get',
      params: data
    })
  },
  //获取所有用户ID和名称列表
  getAllUserIdList(data = {}){
    return request({
      url: `${cloud.usercenter}/sysUser/getAllUserIdList`,
      method: 'get',
      params: data
    })
  },
  //根据用户ID批量查询用户详情
  getUserListByIds(ids) {
    return request({
      url: `${cloud.usercenter}/sysUser/getUserListByIds`,
      method: 'get',
      params: {
        ids
      }
    })
  },
  // 资源库
  getFiledList(data){
    return request({
      url: `${cloud.investment}${FILE}/list`,
      method: 'post',
      data
    })
  },
  delFileItem(data){
    return request({
      url: `${cloud.investment}${FILE}/delete`,
      method: 'post',
      data
    })
  },
  detailFileItem(data){
    return request({
      url: `${cloud.investment}${FILE}/detail`,
      method: 'get',
      params: data
    })
  },
  shareFileItem(data){
    return request({
      url: `${cloud.investment}${FILE}/share`,
      method: 'post',
      data
    })
  },
  uploadFile(data){
    return request({
      url: `${cloud.investment}${FILE}/upload`,
      method: 'post',
      data
    })
  },
  uploadVideo(data){
    return request({
      url: `${cloud.file}/sysFileInfo/uploadfile`,
      method: 'post',
      data
    })
  },
  //重点产业
  getKeyList(data) {
    return request({
      url: `${cloud.investment}${Key}/getPage`,
      method: 'post',
      data
    })
  },
  addKeyItem(data) {
    return request({
      url: `${cloud.investment}${Key}/add`,
      method: 'post',
      data
    })
  },
  updateKeyItem(data) {
    return request({
      url: `${cloud.investment}${Key}/edit`,
      method: 'post',
      data
    })
  },
  delKeyItem(data) {
    return request({
      url: `${cloud.investment}${Key}/delete`,
      method: 'post',
      data
    })
  },
  detailKeyItem(data) {
    return request({
      url: `${cloud.investment}${Key}/detail`,
      method: 'post',
      data
    })
  },
  // 日志管理
  getSysLog(data) {
    return request({
      url: `${cloud.investment}/sysLog/page`,
      method: 'post',
      data
    })
  },
  getSysDetail(data) {
    return request({
      url: `${cloud.investment}/sysLog/detail`,
      method: 'post',
      data
    })
  },
})
